const copyVue = require('./copy/copyVue')
const copyServe = require('./copy/copyServe')
const copyService = require('./copy/copyService')
const copyWebsite = require('./copy/copyWebsite')

module.exports = function tplCopy (type, name) {
  const typeArray = ['vue', 'serve', 'website', 'service']
  if (!typeArray.includes(type)) throw '输入类型不存在'
  switch (type) {
    case 'vue':
      copyVue(name)
      break;
    case 'serve':
      copyServe(name)
      break;
    case 'service':
      copyService(name)
      break;
    case 'website':
      copyWebsite(name)
      break;
  }
}